{% extends 'layout.html' %}

{% block content %}
    <div class="container">

            <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">修改订单</h3>
            </div>
            <div class="panel-body">
                {#  在 https://v3.bootcss.com/css/#forms 全局css样式 - 表单 里  #}
                <form method="post" novalidate>  {#action="/info/add/" 可以省略，默认提交到当前url请求; novalidate: 关闭浏览器校验 #}
                    {% csrf_token %}

                    {% for field in form %}
                        <div class="form-group">
                            <label>{{ field.label }}</label>
                            {{ field }}
                            <!-- 如果有报错信息，只显示第一条 -->
                            <span style="color: red;">{{ field.errors.0 }}</span>
                        </div>
                    {% endfor %}

                    <button type="submit" class="btn btn-primary">保存</button>
                </form>

            </div>
        </div>

    </div>
{% endblock %}